home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Tele / C / Comet2.1.3.cpt / include / ft.h < prev    next >
Text File  |  1991-06-20  |  2KB  |  68 lines

  1. /*
  2.  * COPYRIGHT 1987 CORNELL UNIVERSITY; All Rights Reserved
  3.  *  Please see detailed copyrights and disclaimers in "notice.h"
  4.  */
  5.  
  6. #ifndef _FTDEF
  7. #define _FTDEF
  8.  
  9. /*    constants & variables used by file transfer routines */
  10.  
  11. #define C19FTLEN 150                            /* upload packet size */
  12. #define TBUFLEN  C19FTLEN + C19FTLEN/7 + 10        /* 150 + 23 + 10 = 183 to expand upload packet*/
  13. #define TNFTLEN  2000
  14. #define MAXLEN   4090
  15. #define DOSLEN   1024
  16. #define ESC_CHAR 0x7e
  17. #define PROGVERS 20
  18. #define NUMESC   7
  19.  
  20. /* bits used in host negotiation */
  21. #define REP    0x01
  22. #define CONV   0x02
  23. #define LOOKUP 0x04
  24.  
  25. /* codes received from host */
  26. #define FT3270   0x08           /* 1st byte of packet: normal processing */
  27. #define SHUTDOWN 0x09           /* 1st byte indicates host is all done */
  28.  
  29. #define DOWNLOAD 0x08           /* 2nd byte... */
  30. #define DOWNEOF  0x09
  31. #define UPLOAD   0x0a
  32. #define REXMIT   0x0b
  33.  
  34. /* codes sent to host are 3270 AID bytes */
  35. /* ENTER     ACK OK */
  36. /* PA1         user halt request */
  37. /* PA2         eof on upload */
  38. /* PA3         request re-xmit */
  39. /* PF1         negotiation errors */
  40. /* PF6         write error */
  41. /* PF9         can't interpret packet */
  42. /* PF10     pc immediately quits (abnormal) */
  43.  
  44. #define FILERCV  0x01           /* xfer file from host to pc */
  45. #define FTASCII     0x02           /* perform ebcdic/ascii conversion */
  46. #define NEGO     0x04           /* negotiation done */
  47. #define DONE     0x08           /* we expect to be closed by host */
  48. #define FEOF     0x10           /* end of file */
  49. #define HALT     0x20           /* user halt pressed */
  50. #define NOSTRIP  0x40           /* do not perform 8 for 7 conversion */
  51. #define C19      0x80           /* running C19 */
  52.  
  53. /* ftc19 packet structure used for upload & download */
  54.  
  55. struct ftc19_pkt {
  56.    unsigned pkt_len;         /* total number of bytes to be uploaded */
  57.    unsigned len;             /* length of downloaded data */
  58.    unsigned chk;             /* chksum of downloaded */
  59.    unsigned char lbuff[4];   /* length characters xmitted */
  60.    unsigned char cbuff[4];   /* chksum characters xmitted */
  61.    unsigned char *data;      /* xfer data buffer */
  62. };
  63.    
  64. #endif
  65.  
  66. unsigned long free_sp();        /* ask OS for am't of disk free space */
  67.  
  68.